import { ProColumns } from '@ant-design/pro-components'

const columns: ProColumns[] = [
  {
    title: '报警编号',
    dataIndex: 'alarmId',
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项'
        }
      ]
    },
    width: '30%'
  },
  {
    title: '报警时间',
    dataIndex: 'alarmTime',
    valueType: 'dateRange',
    search: false,
    width: '30%'
  },
  {
    title: '报警时间',
    dataIndex: 'alarmTime',
    valueType: 'dateRange',
    hideInTable: true,
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项'
        }
      ]
    },
    width: '30%'
  },
  {
    title: '报警设备编号',
    dataIndex: 'alarmDeviceId',
    search: false,
    width: '30%'
  },
  {
    title: '报警设备名称',
    dataIndex: 'alarmDeviceName',
    width: '30%'
  },
  {
    title: '报警类型',
    dataIndex: 'alarmType',
    valueType: 'select',
    valueEnum: {
      1: '火灾报警',
      2: '故障报警',
      3: '异常状态报警'
    },
    width: '30%'
  },
  {
    title: '报警级别',
    dataIndex: 'alarmLevel',
    valueType: 'select',
    valueEnum: {
      1: '一级（严重）',
      2: '二级（较严重）',
      3: '三级（一般）'
    },
    width: '30%'
  },
  {
    title: '报警位置',
    dataIndex: 'alarmLocation',
    search: false,
    width: '30%'
  },
  {
    title: '报警详情',
    dataIndex: 'alarmDetails',
    search: false,
    width: '30%'
  },
  {
    title: '处理状态',
    dataIndex: 'handlingStatus',
    valueType: 'select',
    valueEnum: {
      1: '未处理',
      2: '处理中',
      3: '已处理'
    },
    width: '30%'
  },
  {
    title: '处理状态',
    dataIndex: 'handlingPerson',
    search: false,
    width: '30%'
  }
]
export default columns
